<template>
  <view class="exam-record-container">
    <view class="exam-record-header">
      <view class="back-btn">
        <image src="../../static/training/back.png" style="width: 20rpx;" mode="widthFix" @click="back"></image>
      </view>
      <view class="share-btn">
        <image src="../../static/training/share.png" style="width: 40rpx;" mode="widthFix"></image>
      </view>
    </view>
    <view class="poster">
      <view class="poster-title">考试记录</view>
      <view>记录职工的考试情况 </view>
    </view>
    <view class="exam-record-content">
      <u-tabs :list="tabs" lineColor="#0F5BD3">
        <view slot="right" class="tabs-filter" @tap="$u.toast('插槽被点击')">
          <u-icon width="32rpx" height="28rpx" name="../../static/training/filter.png"></u-icon>
        </view>
      </u-tabs>
      <view class="exam-record-list">
        <view class="exam-record-item">
          <view class="exam-record-title">考试名称考试名称考试名称</view>
          <view class="exam-record-desc">
            <view class="exam-record-tags">
              <view class="red-color">90分</view>
              <view class="blue-color">60/120</view>
            </view>
            <view class="exam-record-time">80’56’’</view>
          </view>
          <view class="exam-record-detail">
            <u-icon label="查看详情" labelPos="left" labelSize="24rpx" labelColor="#646464" space="30rpx" size="30rpx"
              name="arrow-right"></u-icon>
          </view>
          <view class="exam-record-type">培训考试</view>
        </view>
        <view class="exam-record-item">
          <view class="exam-record-title">考试名称考试名称考试名称</view>
          <view class="exam-record-desc">
            <view class="exam-record-tags">
              <view class="red-color">90分</view>
              <view class="blue-color">60/120</view>
            </view>
            <view class="exam-record-time">80’56’’</view>
          </view>
          <view class="exam-record-detail">
            <u-icon label="查看详情" labelPos="left" labelSize="24rpx" labelColor="#646464" space="30rpx" size="30rpx"
              name="arrow-right"></u-icon>
          </view>
          <view class="exam-record-type">培训考试</view>
        </view>
        <view class="exam-record-item">
          <view class="exam-record-title">考试名称考试名称考试名称</view>
          <view class="exam-record-desc">
            <view class="exam-record-tags">
              <view class="red-color">90分</view>
              <view class="blue-color">60/120</view>
            </view>
            <view class="exam-record-time">80’56’’</view>
          </view>
          <view class="exam-record-detail">
            <u-icon label="查看详情" labelPos="left" labelSize="24rpx" labelColor="#646464" space="30rpx" size="30rpx"
              name="arrow-right"></u-icon>
          </view>
          <view class="exam-record-type">培训考试</view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        tabs: [{
          name: '全部',
        }, {
          name: '培训考试',
        }, {
          name: '随机考试'
        }, {
          name: '单独考试'
        }]
      }
    },
    methods: {

    }
  }
</script>

<style lang="scss" scoped>
  .exam-record-container {
    background: #f7f7f7;
    min-height: 100%;
  }

  .exam-record-header {
    position: absolute;
    width: 100%;
    top: 50rpx;
    padding: 0 50rpx;
    display: flex;
    justify-content: space-between;
  }

  .poster {
    height: 32vh;
    padding: 0 4%;
    padding-top: 10vh;
    background: rgba(104, 105, 106, 0.2);

    .poster-title {
      font-size: 54rpx;
      color: #000000;
      line-height: 90rpx;
    }
  }

  .exam-record-content {
    margin-top: -120rpx;
    padding: 0 4%;
  }

  .tabs-filter {
    padding-left: 40rpx;
    border-left: 1px solid rgba(104, 105, 106, 0.2);
  }

  .exam-record-list {
    padding-top: 40rpx;
  }

  .exam-record-item {
    position: relative;
    background: linear-gradient(180deg, #E5EFFD, #fff);
    box-shadow: 0px 4px 10px 0px rgba(213, 214, 215, 0.2);
    border-radius: 18rpx;
    padding: 30rpx;
    margin-bottom: 30rpx;

    .exam-record-title {
      color: #222222;
      font-size: 32rpx;
      font-weight: bold;
    }

    .exam-record-desc {
      padding: 20rpx 0 30rpx;
      display: flex;
      justify-content: space-between;
    }

    .exam-record-tags {
      >view {
        display: inline-block;
        padding: 5rpx 10rpx;
        border-radius: 6rpx;
        font-size: 20rpx;
        margin-right: 10rpx;

        &.red-color {
          color: #FF3649;
          border: 1px solid #FF3649;
        }

        &.blue-color {
          color: #1A63FF;
          border: 1px solid #1A63FF;
        }
      }
    }

    .exam-record-time {
      color: #969696;
      font-size: 26rpx;
    }
  }

  .exam-record-detail {
    border-top: 1px dashed rgba(150, 150, 150, 0.32);
    padding: 30rpx 0 0;
    display: flex;
    justify-content: space-between;
  }

  .exam-record-type {
    position: absolute;
    top: 0;
    right: 0;
    color: #fff;
    font-size: 24rpx;
    padding: 10rpx 20rpx;
    background: linear-gradient(90deg, #438BFE 0%, #1A63FF 100%);
    border-top-right-radius: 20rpx;
    border-bottom-left-radius: 20rpx;
  }
</style>